package com.esun.cheetah.biz.personal.personalinfo;

import com.esun.cheetah.config.Language;

/**
 * 
 * @Package com.esun.cheetah.biz.personal.personalinfo.UserInfo
 * @ClassName: UserInfo
 * @Description: TODO(save user info)
 * @author handy <br/>
 * @date create at 2012-7-31 下午3:12:34
 * 
 */
public class UserInfo {
	/** 默认有效时间*/
	private  Long validTime=0l;
	private static UserInfo userInfo = null;

	public static UserInfo getUserInfo() {
		if (userInfo == null) {
			return userInfo = new UserInfo();
		} else {
			return userInfo;
		}
	}

	/** 网络状态 */
	private boolean isNetWork;

	/** 购彩中的充值操作 ,是否为购彩中的充值操作 */
	private boolean isBuyingRecharge;

	/** pid */
	private String pid = "";

	/** 用户账户余额 */
	private String userBalance = "0";

	/** 投注金额 */
	private String touzhuMoney = "";

	/** 用户名 */
	private String userName = "";

	/** 临时用户名 */
	private String usernameString = "";

	/** 临时密码 */
	private String userpassword = "";

	/** 用户密码 */
	private String userPwd = "";

	/** 用户登录密码 */
	private String userpass = "";

	/** MD5密码 */
	private String userpwdMD5 = "";

	/** ck值 */
	private String ck = "";

	/** 服务器返回msg */
	private String msg = "";

	/** 用户余额 */
	private String money = "0.00";

	/** 登录时间 */
	private long logintime = 0;

	/** 绑定手机号 */
	private String bindmobile;

	/** 服务器返回freezemoney */
	private String freezemoney = "";
	
	//继续购买操作,是否为继续购买
	private boolean isRebuy = false;
	
	private boolean isAccountProct=true;
	
	private Long chooseTime=0L;
	public Long getValidTime() {
		return validTime;
	}

	public void setValidTime(Long validTime) {
		this.validTime = validTime;
	}
	public Long getChooseTime() {
		return chooseTime;
	}

	public void setChooseTime(Long chooseTime) {
		this.chooseTime = chooseTime;
	}
	// 字体, 默认 true 简体 
	public boolean isTypeface() {

		if(((System.currentTimeMillis())-chooseTime)<validTime){
			return false;
		}
		return true;
	}

	private String defaultAccountTime= Language.DEFAULT_TIME;

	public String getDefaultAccountTime() {
		return defaultAccountTime;
	}

	public void setDefaultAccountTime(String defaultAccountTime) {
		this.defaultAccountTime = defaultAccountTime;
	}

	public boolean isAccountProct() {
		return isAccountProct;
	}

	public void setAccountProct(boolean isAccountProct) {
		this.isAccountProct = isAccountProct;
	}

	/** 保护时间 */
	private long durationTime = 0;

	public boolean isBuyingRecharge() {
		return isBuyingRecharge;
	}

	public void setBuyingRecharge(boolean isBuyingRecharge) {
		this.isBuyingRecharge = isBuyingRecharge;
	}

	public String getFreezemoney() {
		return this.freezemoney;
	}

	public void setFreezemoney(String freezemoney) {
		this.freezemoney = freezemoney;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPwd() {
		return this.userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}

	public String getUserpass() {
		return this.userpass;
	}

	public void setUserpass(String userpass) {
		this.userpass = userpass;
	}

	public String getUserpwdMD5() {
		return this.userpwdMD5;
	}

	public void setUserpwdMD5(String userpwdMD5) {
		this.userpwdMD5 = userpwdMD5;
	}

	public String getCk() {
		return this.ck;
	}

	public void setCk(String ck) {
		this.ck = ck;
	}

	public String getMoney() {
		return this.money;
	}

	public void setMoney(String money) {
		this.money = money;
	}

	public long getLogintime() {
		return this.logintime;
	}

	public void setLogintime(long logintime) {
		this.logintime = logintime;
	}

	public String getBindmobile() {
		return this.bindmobile;
	}

	public void setBindmobile(String bindmobile) {
		this.bindmobile = bindmobile;
	}

	public String getUserBalance() {
		return this.userBalance;
	}

	public void setUserBalance(String userBalance) {
		this.userBalance = userBalance;
	}

	public void setNetWork(boolean isconnected) {
		this.isNetWork = isconnected;
	}

	public boolean getNetWork() {
		return this.isNetWork;
	}

	public String getMsg() {
		return this.msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getUsernameString() {
		return this.usernameString;
	}

	public String getUserpassword() {
		return this.userpassword;
	}

	public void setUsernameString(String usernameString) {
		this.usernameString = usernameString;
	}

	public void setUserpassword(String userpassword) {
		this.userpassword = userpassword;
	}

	public String getTouzhuMoney() {
		return this.touzhuMoney;
	}

	public void setTouzhuMoney(String touzhuMoney) {
		this.touzhuMoney = touzhuMoney;
	}

	public String getPid() {
		return this.pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public long getDurationTime() {
		return this.durationTime;
	}

	public void setDurationTime(long durationTime) {
		this.durationTime = durationTime;
	}
	
	/**
	 * @return the isRebuy
	 */
	public boolean isRebuy() {
		return isRebuy;
	}

	/**
	 * @param isRebuy
	 *            the isRebuy to set
	 */
	public void setRebuy(boolean isRebuy) {
		this.isRebuy = isRebuy;
	}

}